﻿using Cassandra.Data.Linq;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Cognitum.CassandraTableStorage.Entities
{
    [AllowFiltering]
    [Table]
    public class session_state_entity
    {
        [PartitionKey]
        [Column]
        public virtual string session_id { get; set; }

        [ClusteringKey(1),
        Column]
        public string application_name { get; set; }

        [Column]
        [SecondaryIndex]
        public DateTimeOffset expires { get; set; }

        [Column]
        public DateTimeOffset lock_date { get; set; }

        [Column]
        [SecondaryIndex]
        public int lock_id { get; set; }

        [Column]
        public int time_out { get; set; }

        [Column]
        [SecondaryIndex]
        public bool locked { get; set; }

        [Column]
        public string session_items { get; set; }

        [Column]
        public int flags { get; set; }
    }
}